package com.arcaneshift.servlet.action.user;

import java.io.IOException;
import java.util.HashSet;
import java.util.Set;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.arcaneshift.model.request.user.LoginRequest;
import com.common.model.abstracts.AbstractRequest;
import com.common.model.abstracts.AbstractValidator;
import com.common.security.abstracts.AbstractException;
import com.common.security.exceptions.HTTPException;
import com.common.security.exceptions.ParserException;
import com.common.security.exceptions.UserException;
import com.common.servlet.abstracts.AbstractParserServlet;
import com.common.servlet.interfaces.IParser;

public class DeleteUserServlet extends AbstractParserServlet {
	private static final long serialVersionUID = 1L;
	private static Set<AbstractValidator> validators = new HashSet<AbstractValidator>();
	
	private LoginRequest requestContent;
	
	@Override
	public void handle(HttpServletRequest request, HttpServletResponse response) {
		// Trivial priority: implement
		
	}

	@Override
	public void setRequest(AbstractRequest abstractRequest) {
		// Trivial priority: implement
		
	}

	@Override
	public AbstractRequest parseRequest(HttpServletRequest request) throws UserException {
		try {
			return parser().parseRequest(request.getInputStream());
		} catch (ParserException e) {
			// Trivial priority: implement
			e.printStackTrace();
		} catch (HTTPException e) {
			// Trivial priority: implement
			e.printStackTrace();
		} catch (IOException e) {
			// Trivial priority: implement
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public Set<AbstractValidator> getValidators() {
		return validators;
	}
	
	public void exception(AbstractException exception, HttpServletResponse response) {
		//TODO Trivial priority: switch
	}

	@Override
	public IParser parser() {
		// TODO Trivial priority: implement parser
		return null;
	}

}
